const {
    Mysql
} = require('../tools/utils');
module.exports = async (ctx) => {
    let {
        uid
    } = ctx.query;
    let sql = `SELECT * FROM orderList WHERE uid = ${uid}`;
    try {
        let res = await Mysql(sql);
        ctx.state.data = {
            list: res,
            code: '001'
        }
    } catch (error) {
        ctx.state.data = {
            code: '002'
        }
    }
}